<?php

namespace api\modules\app\models;

use Yii;

/**
 * This is the model class for table "dict_department_sub".
 *
 * @property integer $id
 * @property string $sup_id
 * @property string $sub_id
 * @property integer $cuser
 * @property string $ctime
 */
class DictDepartmentSub extends \api\modules\app\models\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dict_department_sub';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('test_3');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['sup_id', 'sub_id'], 'required'],
            [['cuser'], 'integer'],
            [['ctime'], 'safe'],
            [['sup_id', 'sub_id'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'sup_id' => 'Sup ID',
            'sub_id' => 'Sub ID',
            'cuser' => 'Cuser',
            'ctime' => 'Ctime',
        ];
    }
}